<p style="padding-top: 10px;font-size: 20px; padding: 10px;padding-left: 10px;background-color: #e87c3a;">
  登录</p>
<img src="../../../assets/logo2.jpg" alt="" width="100%" height="300px" style="margin-bottom: 40px;" >
<ion-list *ngIf="!userdata">
    <ion-item>
      <ion-input label="账号" placeholder="请输入账号名" [(ngModel)]="name"></ion-input>
    </ion-item>
    <ion-item>
      <ion-input label="密码" placeholder="请输入密码" [(ngModel)]="password"></ion-input>
    </ion-item>
</ion-list>
<div *ngIf="!userdata" style="width: 100%; display: flex; margin-top: 40px;">
  <button style="background-color: #e87c3a;" (click)="login()">登录</button>
  <button style=" border:1px solid #e87c3a;" routerLink="/mobile-cooking/sign">注册</button>
</div>

<div *ngIf="userdata" style="width: 100%; display: flex; margin-top: 40px;" >
  <button style="border:1px solid #e87c3a;" (click)="logout()">登出</button>
</div>

